//
//  CollectHeadView.m
//  FKGW
//
//  Created by song ce on 2017/2/20.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "CollectHeadView.h"
#import "UIView+Extend.h"
@implementation CollectHeadView
- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.contentView.backgroundColor =[UIColor whiteColor];
    
    UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
    [self addGestureRecognizer:tap];

    
    //店铺名称
    self.shopNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 8, 0, 21)];
    self.shopNameLabel.textColor = DEF_COLOR102;
    self.shopNameLabel.font = [UIFont systemFontOfSize:14];
    [self.shopNameLabel sizeToFit];
    [self.contentView addSubview:self.shopNameLabel];
    
    //指示图片
    self.indicatorImageV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_gouwuche_jinru"]];
    self.indicatorImageV.left = self.shopNameLabel.right +5;
    self.indicatorImageV.top  = 10;
    [self.contentView addSubview:self.indicatorImageV];

}

-(void)setGroup:(CollectGroup *)group{
    _group = group;
    self.shopNameLabel.text = _group.storeName;
    [self.shopNameLabel sizeToFit];
    self.indicatorImageV.left = self.shopNameLabel.right +5;

//    self.timeLabel.text = [NSString stringWithFormat:@"收藏时间为%@",_group.time];
}

-(void)tap:(UITapGestureRecognizer*)tap{
    if(self.tapBlock){
        self.tapBlock();
    }
}

@end
